home *** CD-ROM | disk | FTP | other *** search
- L_Welcome_MsgBox_Message_Text = "This script demonstrates DameWare Group using the Windows Scripting Host."
- L_Welcome_MsgBox_Title_Text = "DameWare Windows Scripting Host Sample"
-
- CrLf = chr(13) & chr(10)
- MyTab = chr(9)
-
- Call Welcome()
-
- Dim DCtl1, strDomain, strUserID
-
- Set DCtl1 = Wscript.CreateObject("DameWare.DGroupCtl.1")
-
- strDomain = DCtl1.GetLocalMachineName
- strUserID = DCtl1.GetCurrentUserID
-
- Ans = MsgBox ("Local Machine Name: " & strDomain & CrLf & _
- MyTab & "User Id: " & strUserID, _
- vbOKOnly + vbInformation, _
- L_Welcome_MsgBox_Title_Text )
-
- DCtl1.Domain = DCtl1.GetLocalMachineName
- DCtl1.SetFirstGroup
-
- Dim strGroups
-
- While DCtl1.GroupGetNext <> 0
- strGroups = strGroups & DCtl1.Group & MyTab & DCtl1.Groupcomment & CrLf
- Wend
-
- MsgBox "All Local Groups: " & CrLf & CrLf & strGroups
-
- Set DCtl1 = Nothing
-
- Sub Welcome()
- Dim intDoIt
-
- intDoIt = MsgBox(L_Welcome_MsgBox_Message_Text, _
- vbOKCancel + vbInformation, _
- L_Welcome_MsgBox_Title_Text )
- If intDoIt = vbCancel Then
- WScript.Quit
- End If
- End Sub
-
-